package com.hospital.entity;


import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author fxy
 * @date 2022/8/28
 */
@Data
public class User {
    //用户id
    @ExcelIgnore
    private Integer id;
    //用户姓名
    @ExcelProperty("姓名")
    private String name;
    //用户密码
    @ExcelProperty("密码")
    @ExcelIgnore
    private String password;
    //用户性别
    @ExcelProperty("年龄")
    private Integer sex;
    @JsonFormat(pattern = "yyyy-MM-dd")//返回
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    //出生日期
    @ExcelProperty("生日")
    private Date birthday;
    //手机号
    @ExcelProperty("手机")
    private String phone;
    //余额
    @ExcelProperty("余额")
    private Double surplus;
    @JsonFormat(pattern = "yyyy-MM-dd")//返回
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ExcelIgnore
    //创建时间
    private Date ctime;
    //头像地址
    private String imgurl;
}
